@extends('admin.layouts.app')
@section('css')
<link href="/admins/vendors/datatables.net-bs/css/dataTables.bootstrap.css" rel="stylesheet">
@endsection

@section('content')
<div class="">
	<div class="page-title">
		<div class="title_left">
			<h3>微信菜单</h3>
		</div>
	</div>

	<div class="clearfix"></div>
	@include('flash::message')
	<div class="row">
		<div class="col-md-12 col-sm-12 col-xs-12">
			<div class="x_content">
					<div class="col-md-12 col-sm-12 col-xs-12">
						<div class="x_panel">
							<div class="x_title">
								<h2>菜单列表</h2>
								<ul class="nav navbar-right panel_toolbox">
									{!!$submitButton!!}
									{!!$delButton!!}
									{!!$addButton!!}
								</ul>
								<div class="clearfix"></div>
							</div>
							<div class="x_content">
								<table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
									<thead>
										<tr>
											<th>名称</th>
											<th>URL</th>
											<th>排序</th>
											<th width="200">操作</th>
										</tr>
									</thead>
									<tbody>
										@foreach ($menus as $menu)
										    <tr>
										    		<td>{{$menu->name}}</td>
										    		<td>{{$menu->url}}</td>
										    		<td>{{$menu->sort}}</td>
										    		<td>{!! $menu->actionButton !!}</td>
										    </tr>
										    @foreach ($menu->child as $c)
										    <tr>
										    		<td style="padding-left: 50px;">{{$c->name}}</td>
										    		<td>{{$c->url}}</td>
										    		<td>{{$c->sort}}</td>
										    		<td>{!! $c->actionButton !!}</td>
										    </tr>
										    @endforeach
										@endforeach
									</tbody>
								</table>

							</div>
						</div>
					</div>
				</div>
		</div>
	</div>
</div>
@endsection

@section('js')

@endsection
